#pragma once

// has four default functions

struct PointN
{
	int x;
	int y;
	PointN(){}
	PointN(int _x, int _y) : x(_x), y(_y) {}

	void PrintPt()
	{
		System::Console::WriteLine("(X:{0},Y:{1})",x,y);
	}
};

class LineN
{
private:
    PointN m_ptStart;
    PointN m_ptEnd;
public :
    LineN(PointN start,PointN end)
    {
        m_ptStart = start;
        m_ptEnd = end;
    }
	~LineN(){}
	void PrintLine()
	{
		System::Console::Write("StartPoint:");
		m_ptStart.PrintPt();
		System::Console::Write("EndPoint:");
		m_ptEnd.PrintPt();
	}
};


void Test1()
{
	PointN pt(10,10);
	pt.PrintPt();
	PointN* pPt = new PointN(20,20);
	pPt->PrintPt();
	delete pPt;
	
	LineN line(PointN(30,30), PointN(40,40));
	line.PrintLine();
	LineN* pLine = new LineN(PointN(50,50), PointN(60,60));
	pLine->PrintLine();
	delete pLine;
}